#include <iostream>
//#include <config.h>
#include "TDMSData.h"
#include <chrono>

int main( int argc, char** argv )
{
    std::cout << "\nTDMS Reader v"
//            << TDMSREADER_VERSION_MAJOR
//            << "." << TDMSREADER_VERSION_MINOR
              << "\n" << std::endl;

    auto start = std::chrono::high_resolution_clock::now();

    std::cout << "timer start" << std::endl;;
    TDMSData tdmsData( argv[1] );
    std::cout << "initialize TMDSData" << std::endl;;
    tdmsData.read();

    int nobject = tdmsData.getGroupCount();
    std::cout << "object num: "
              << nobject
              << std::endl;
//    tdmsData.print( std::cout );

    std::cout << "test" << std::endl;
    auto end = std::chrono::high_resolution_clock::now();
    std::chrono::duration<double> elapsed_seconds = end - start;
    std::cout << "function time cost: " << elapsed_seconds.count() << " ms" << std::endl;
    return 0;
}
